//
//  PushTool.m
//  爆米花视频
//
//  Created by mac on 14-11-3.
//  Copyright (c) 2014年 mac. All rights reserved.
//

#import "PushTool.h"

#import "NSString+Ext.h"
#import "GlobTool.h"
#import "AppUpdate.h"
@implementation PushTool


#pragma mark - 检测新版本
+ (void)checkVersionWithVersion:(NSString *)version success:(CheckVersionSuccessBlock)success failure:(CheckVersionFailureBlock)failure
{
    
}
#pragma mark - 获取应用最新版本
+ (void)appUpdateSuccess:(AppUpdateSuccessBlock)success failure:(AppUpdateFailureBlock)failure
{
    
    [[[XLHTTPSessionManager sharedManager]XLV2GET:@"Api/v2/Versioning/GetVersion" parameters:@{@"qudao":QudaoName} resultClass:nil] subscribeNext:^(id x) {
        NSLog(@"tttttttt%@",x);
        
        AppUpdate *appUpdate = [[AppUpdate alloc] initWithDic:(NSDictionary *)x];
        success(appUpdate);
        
    } error:^(NSError *error) {
        NSLog(@"%@", error);
        if (failure == nil) return;
        failure(error);
    }];
}

@end
